package com.qk.management.mapper;

import com.qk.entity.Avatar;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface AvatarMapper {
    void insert(Avatar avatar);

    List<Avatar> listByUserId(@Param("userId") Long userId, @Param("limit") int limit);

    void markAsGarbage(@Param("ids") List<Long> ids, @Param("garbageStatus") int garbageStatus);

    List<Avatar> listGarbageBefore(@Param("beforeTime") LocalDateTime beforeTime, @Param("garbageStatus") int garbageStatus);

    void deleteBatch(@Param("ids") List<Long> ids);
    
    Avatar getCurrentAvatar(@Param("userId") Long userId, @Param("activeStatus") int activeStatus);
}